﻿using System.Linq;
using System.Web.Mvc;

namespace KaytechSoftware.Cms.App.App_Start
{
    public class CmsViewEngine : RazorViewEngine
    {

        private static readonly string[] NewAreaViewLocationFormats = new[] { "~/Areas/{2}/Views/Grid/{0}.cshtml" };

        public CmsViewEngine()
        {
            AreaViewLocationFormats = AreaViewLocationFormats.Union(NewAreaViewLocationFormats).ToArray();
            AreaPartialViewLocationFormats = AreaPartialViewLocationFormats.Union(NewAreaViewLocationFormats).ToArray();
        }
    }
}